<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>#{bundle.company}</title>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <ui:composition>
            <h:form>
                <p:toolbar>
                    <p:toolbarGroup align="left">
                        <p:commandButton value="#{bundle.btnSave}" image="ui-icon-disk" action="#{companyBean.save()}"
                                   rendered="#{menuBean.cekButtonAccess(607,'UPD;')}"       />  
                       <!--  <p:commandButton value="#{bundle.btnOpen}" image="ui-icon-disk" 
                                         update="displayCompany" > 
                        </p:commandButton>         
                        <p:commandButton type="push" value="#{bundle.btnDelete}" image="ui-icon-trash"/>
                       <p:commandButton type="push" value="#{bundle.btnPrint}" image="ui-icon-print"/>-->
                    </p:toolbarGroup>
                </p:toolbar>
                <br />
                <h:panelGrid id="displayCompany" cellpadding="0" styleClass="addELIT">
                    <h:panelGrid cellpadding="0" columns="2">
                        <p:panel>
                            <h:panelGrid cellpadding="0" columns="2">
                                <h:outputLabel value= "#{bundle.globalName} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.companyName}" />

                                <h:outputLabel value= "#{bundle.adress} :" />
                                <p:inputText size="50" rendered="true" value="#{companyBean.company.addressLine1}" />

                                <h:outputLabel value= "" />
                                <p:inputText size="50" rendered="true" value="#{companyBean.company.addressLine2}" />

                                <h:outputLabel value= "" />
                                <p:inputText size="50" rendered="true" value="#{companyBean.company.addressLine3}" />

                                <h:outputLabel value= "#{bundle.phone} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.phone}" />

                                <h:outputLabel value= "#{bundle.fax} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.fax}" />

                                <h:outputLabel value= "#{bundle.email} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.email}" />

                                <h:outputLabel value= "#{bundle.website} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.website}" />

                                <h:outputLabel value= "#{bundle.businessTaxno} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.businessTaxno}" />

                                <h:outputLabel value= "#{bundle.taxCode} :" />
                                <p:inputText rendered="true" value="#{companyBean.company.taxCode}" />

                                <h:outputLabel value= "#{bundle.currency} :" />
                                <h:panelGroup>
                                    <p:selectOneMenu value="#{companyBean.company.currency.currencyId}" style="width: 100px" rendered="true">
                                        <f:selectItem itemLabel="Select #{bundle.currency}" itemValue="" />
                                        <f:selectItems value="#{companyBean.avaibleCurrency}" var="cur" itemLabel="#{cur.currencyName}" itemValue="#{cur.currencyId}" />
                                    </p:selectOneMenu> 
                                </h:panelGroup>

                                <h:outputLabel style="padding: 0 15px 0 0;" value= "#{bundle.businessTaxdate} :" />
                                <p:calendar pattern="dd/MM/yyyy" size="8" value="#{companyBean.company.businessTaxdate}" />
                            </h:panelGrid>

                            <!--h:panelGrid cellpadding="1" styleClass="pComBtnSTDR">
                                <f:facet name="footer">
                                    <p:commandButton value="Save" image="ui-icon-disk" action="{companyBean.save()}"
                                                     update="grwCompany company"       
                                                     oncomplete="handleSaveRequest(xhr, status, args)"/>  
                                </f:facet>
                            </h:panelGrid-->
                        </p:panel>
                    </h:panelGrid>
                </h:panelGrid>
                <!--/p:dialog-->
            </h:form>
        </ui:composition>
    </h:body>
</html>
